#ifndef ORDERSETTERDLG_H
#define ORDERSETTERDLG_H

#include <QDialog>
#include"changeorderdlg.h"
#include"fastorderdlg.h"
#include"ordercntdlg.h"
#include"ordertimesdlg.h"
#include<QKeyEvent>

namespace Ui {
class OrderSetterDlg;
}

class OrderSetterDlg : public QDialog
{
    Q_OBJECT

public:
    explicit OrderSetterDlg(QWidget *parent = 0);
    ~OrderSetterDlg();

    bool GetChangeOrderFlg();
    bool GetFastOrderFlg();
    bool GetPingJinCangFlg();

    bool GetClosePositionFlg();
    bool GetCancelOrderDoubleClickedFlg();
    bool GetCancelOrderConfirmFlg();

    QString  GetClosePositionPriceType();
    QString  GetClosePositionCntType();

    int GetDefaultOrderCnt();

    void OrderDefaultAction(QKeyEvent *k);
    QString GetKeyString(QKeyEvent *k);

    void FastOrderEvent(FastInfo* pFastInfo);

public slots:
    void SlotHideCancelOrderButtonToggled(bool b);
    void SlotJudgeChangeKeyString(QString key);
    void SlotJudgeFastKeyString(QString key);
    void SlotJudgeTimesKeyString(QString key);

    void SelectDlg(int index);
    void OKButtomClicked();

signals:
    void SigHideCancelOrderButtonToggled(bool);
    void SigJudgeChangeKeyString(QString msg);
    void SigJudgeFastKeyString(QString msg);
    void SigJudgeTimesKeyString(QString msg);

    void SigFastOrder(FastInfo* pFastInfo);
    void SigChangeOrder(int iChangeType);
    void SigSetHandsTimes(int iTimes);
    void FastOrderOK();
    void ChangeOrderOK();
    void OrderTimesOK();
    void OrderSettingsOK();

private:
    Ui::OrderSetterDlg *ui;

    ChangeOrderDlg* m_ChangeOrderDlg;
    FastOrderDlg*   m_FastOrderDlg;
    OrderCntDlg*    m_OrderCntDlg;
    OrderTimesDlg*  m_OrderTimesDlg;
};

#endif // ORDERSETTERDLG_H
